#ifndef __SYSTEM_H__
#define __SYSTEM_H__

#define PRODUCT_INFO_MAGIC 0x50524F44 //"PROD"

typedef struct{
	uint32_t magic;
	long initial_angle;
	int16_t init_crack_depth;
}PRODUCT_CONTENT_T;

typedef struct{
	PRODUCT_CONTENT_T content;
	uint8_t acc8;
}PRODUCT_INFO_T;

extern PRODUCT_INFO_T g_product_info;

void sem_product_post(void);
void sem_product_pend(void);
extern int32_t product_info_init(void);
int32_t product_info_read(PRODUCT_INFO_T* p_product_info);
int32_t product_info_write(PRODUCT_INFO_T* p_product_info);


#ifdef WDG_ENABLE	
extern void iwdg_init(void);
#endif
extern void idle_process(void);
extern void reboot_system(void);
#endif

